{% extends "base.html" %}
{% load markup %}

{% block title %}{{ report.title }}{% endblock %}

{% block primary-content %}	
<span class="breadcrumbs"><a href="{% url index %}" title="Home">Home</a> &raquo; <a href="{% url reports %}" title="Reports">Reports</a> &raquo; An {{ location.site.name }} Report</span>
<h2>An {{ location.site.name }} Report</h2>
{% if not_published %}
  <p class="alert">This report is not published. It will not appear elsewhere on the site until it is marked as "active."</p>
{% endif %}
<h3 class="report">{{ report.title }}{% if report.subtitle %} <span class="subtitle">{{ report.subtitle }}</span>{% endif %}</h3>
<div class="report-aside">
{% with report.issues.active as issues %}
{% with report.reps.active as reps %}
  {% include "news/snippets/aside.html" %}
{% endwith %}
{% endwith %}
</div>
<div class="report-main">
	<small class="date-posted">Posted {{ report.pub_date|date }} by {{ report.get_author }}</small>
	<div class="synopsis">{{ report.synopsis|markdown }}</div>
	<h4 class="findings"><a id="findings" name="findings"></a>Findings</h4>
	{{ report.findings|markdown }}
	<h4 class="recommendations"><a id="recommendations" name="recommendations"></a>Recommendations</h4>
	{{ report.recommendations|markdown }}
  {% if report.attachments.all %}
	<h4 class="data"><a id="data" name="data"></a>Detailed Data Downloads</h4>
	<p class="data">To learn more, download the full report files.</p>
	<ul>
		{% for attachment in report.attachments.all %}
		<li><a href="{{ attachment.upload.url }}">{{ attachment }}</a></li>
		{% endfor %}
	</ul>	
  {% endif %}
	<ul id="share">
	  <li id="share-twitter"><a title="Share on Twitter" href="http://api.tweetmeme.com/share?url=http://www.ourphiladelphia.org{% url report report.id %}">Twitter</a></li>
	  <li id="share-facebook"><a title="Share on Facebook" href="http://www.facebook.com/share.php?u=http://www.ourphiladelphia.org{% url report report.id %}">Facebook</a></li>
	  <li id="share-delicious"><a title="Share on Delicious" href="http://www.delicious.com/post?url=http://www.ourphiladelphia.org{% url report report.id %}">Delicious</a></li>
	  <li id="share-digg"><a title="Share on Digg" href="http://www.digg.com/submit?phase=2&url=http://www.ourphiladelphia.org{% url report report.id %}">Digg</a></li>		      
	</ul>
	
</div>
{% if older or newer %}
<div class="pager clear-left">
  {% if older %}
  <div class="float-left"><a href="{% url report older.id %}">&laquo; Last Report</a></div>
  {% endif %}
  {% if newer %}
  <div class="float-right"><a href="{% url report newer.id %}">Next Report &raquo;</a></div>
  {% endif %}
</div>
{% endif %}
{% endblock %}

{% block secondary-content %}
  {% include "snippets/signup_or_info.html" %}
  {% include "news/snippets/report_archives.html" %}
  {% include "snippets/reports_and_news.html" %}
{% endblock %}

